<template>
	<a-card :bordered="false">
	  <!-- 查询区域 -->
	  <search :config="searchConfig" @search="search" @getHeight="getHeight" />

	  <!-- table区域-begin -->
	  <div class='page_table'>
	    <vxe-grid
	      ref='xGrid'
	      :border='true'
	      :resizable='true'
	      :showOverflow='true'
	      size='mini'
	      :loading='loading'
	      :height='pageHeight-seachHeight-94'
	      :align='left'
	      :columns='columns'
	      :data='dataSource'
	      :toolbar-config="tableToolbar"
	     :checkbox-config="checkboxConfig"
	      v-bind='vexConfig'
	      @checkbox-change='selectChangeEvent'
	      @checkbox-all="selectChangeEvent"
	    >
		<template #toolbar_buttons>
		  <div class="table-operator">
			  <a-button v-has="'ordermgt:add'" @click='handleAdd' type='primary'>新增</a-button>
			  <a-button type='primary' @click="batchDel">删除</a-button>
			   <a-button type='primary' @click="">导入</a-button>
		    <a-button type='primary' v-has="'ordermgt:export'" @click="downExportXls('cnProduct_service' )">导出</a-button>
		    <a-button type='primary' v-has="'business:log'"  @click='handleBusiness("提货点",row)'>日志</a-button>
		  </div>
		</template>
		<template #pager>
		  <vxe-pager
		    :layouts="['Total', 'PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump','Sizes', 'FullJump']"
		    :currentPage.sync='ipagination.current'
		    :page-size.sync='ipagination.pageSize'
		    :total='ipagination.total'
		    :pageSizes='ipagination.pageSizeOptions'
		    @page-change='handlePageChange'>
		  </vxe-pager>
		</template>
	    </vxe-grid>
	  </div>
	  <orderAccepModal ref="modalForm" @ok="modalFormOk"></orderAccepModal>
	  <business-log ref='businessLog'></business-log>
	</a-card>
</template>

<script>
	import orderAccepModal from './TerminalOrderModal/orderAccepModal.vue'
	import ordermgtModal from './TerminalOrderModal/ordermgtModal.vue'
	import { PageListMixin } from '@/mixins/PageListMixin'
	import { getAction, postAction } from '@api/manage'
	import Vue from 'vue'
	import { filterObj } from '@/utils/util'
	export default {
	  name: 'userorgerl',
	  mixins: [PageListMixin],
	  components: {
	    ordermgtModal,
		orderAccepModal
	  },
	data() {
	  return {
	    selectedRowKeys: [],
	    description: '用户组织关系',
	    searchConfig: [
	      {
	        // label:'区域编号',
	        type: 'input',
	        name: '',
	        placeholder: ' DMS订单编号'
	      }, {
	        type: 'input',
	        name: '',
	        placeholder: '代配送商',
	      },
	      {
	        // label:'区域编号',
	        type: 'input',
	        name: '',
	        placeholder: '经销商名称'
	      },
	      {
	        type: 'a-select',
	        name: 'status',
	        placeholder: '请选择状态',
			dictCode:'',
	      },
	    ],
	    //表头
	    columns: [],
	    //列设置
	    settingColumns: [],
	    columns: [
	      { type: 'checkbox', width: 60, fixed: 'left' },
	      {
	        title: '订单编号',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      },
	      {
	        title: '订单类型',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      },
	      {
	        title: '经销商编号',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      },
	      {
	        title: '经销商名称',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      }
	      ,{
	        title: '所属组织',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      },
	      {
	        title: '订单数量',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      }
	      ,{
	        title: '验收数量',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      }
	      ,{
	        title: '订单金额',
	        align: 'left',
	        field: '',
	        minWidth: 80,
	      },
	      {
	        title: '验收金额',
	        align: 'left',
	        minWidth: 80,
	        field: ''
	      },
		  {
		    title: '代配送商编号',
		    align: 'left',
		    minWidth: 80,
		    field: ''
		  },
		  {
		    title: '订单状态',
		    align: 'left',
		    minWidth: 80,
		    field: ''
		  },
		  {
		    title: '操作',
		    align: 'left',
		    minWidth: 80,
		    field: ''
		  }
	    ],
	    url: {
	      list: window._CONFIG['domianURL'] + '',
	      // detail: window._CONFIG['domianURL'] + '/userorgrelation/cnUserOrgRelation/saveOrUpdate',
	      edit: window._CONFIG['domianURL'] + '/mdsProduct/saveOrUpdateEntity',
	      deleteBatch: '/userorgrelation/cnUserOrgRelation/deleteBatch',
	      delete: window._CONFIG['domianURL'] + '/userorgrelation/cnUserOrgRelation/delete',
	      exportXlsUrl: window._CONFIG['domianTpmURL'] + 'budget/tpmBudgetFee/exportXls',

	    }
	  }
	},
	methods: {
	//   handleAdd(record = {}, title = '1+N订单新增', disabled = false, disableSubmit = false) {
	//     let config = {
	//       title: title,
	//       width: 1200,
	//       addOrUpdateUrl: `/pupconfig/cnPupConfig/saveOrUpdate`,  //审核地址
	//       method: 'post',
	//       labelCol: {
	//         xs: { span: 24 },
	//         sm: { span: 7 }
	//       },
	//       wrapperCol: {
	//         xs: { span: 24 },
	//         sm: { span: 16 }
	//       },
	//       // divider: {
	//       //   name: '基础信息',
	//       //   location: 'left'
	//       // },
	//       list: [
	//         {
	//           label: '订单编号',
	//           type: 'input',
	//           name: 'pupCode',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           check: { rules: [{ required: true, message: '请填写提货点编号', whitespace: true }] },
	//           md: 8

	//         },
	//         {
	//           label: '经销商编号',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '经销商名称',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '配送商编号',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '配送商名称',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '收货地址',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '联系信息',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '物流模式	',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '发货时间',
	//          type: 'input',
	//          name: 'pupName',  // 后台接受字段
	//          placeholder: '',
	//          disabled,
	//          md: 8,
	//          // check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '签收时间',
	//          type: 'input',
	//          name: 'pupName',  // 后台接受字段
	//          placeholder: '',
	//          disabled,
	//          md: 8,
	//          // check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	//         {
	//           label: '验收数量',
	//           type: 'input',
	//           name: 'pupName',  // 后台接受字段
	//           placeholder: '',
	//           disabled,
	//           md: 8,
	//           // check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	//         },
	// 		{
	// 		  label: '应收金额',
	// 		  type: 'input',
	// 		  name: 'pupName',  // 后台接受字段
	// 		  placeholder: '',
	// 		  disabled,
	// 		  md: 8,
	// 		  // check: { rules: [{ required: true, message: '请输入package路径',whitespace:true }] }
	// 		},
	//         {
	//           label: '备注',
	//           type: 'textarea',
	//           placeholder: '',
	//           disabled,
	//           labelCol: {
	//             xs: { span: 32 },
	//             sm: { span: 3 }
	//           },
	//           name: 'remarks'  // 后台接受字段
	//         }
	//       ]

	//     }
	//     this.$refs.popupForm.edit(record, config)
	//     this.$refs.popupForm.disableSubmit = disableSubmit

	//   }
	},
	created() {
	  this.initColumns()
	}
	}
</script>

<style>
</style>